//
//  DatePickersView.swift
//  SwiftUIDemo
//
//  Created by zhouzuosong on 2020/12/25.
//  Copyright © 2020 Kael. All rights reserved.
//

import SwiftUI

struct DatePickersView: View {
    @State private var loveTime = Date()

    var body: some View {

        ZStack {
            Color(red: 0xff/255, green: 0x34/255, blue: 0x34/255)
            DatePicker("自定义事件名", selection: $loveTime, displayedComponents: .date)
                            .datePickerStyle(GraphicalDatePickerStyle())
                .accentColor(.green)
                .background(Color.yellow.blur(radius: 13.0))
        }
        
    }
}

struct DatePickersView_Previews: PreviewProvider {
    static var previews: some View {
        DatePickersView()
    }
}
